#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>

#define BUFSIZE 16

void vuln() 
{
		char buf[16];
		printf("GIVE ME YOUR NAME!\n");
		return gets(buf);
}
int main(int argc, char **argv)
{
 		setvbuf(stdout, NULL, _IONBF, 0);
  		// Set the gid to the effective gid
  		// this prevents /bin/sh from dropping the privileges
  		gid_t gid = getegid();
  		setresgid(gid, gid, gid);
  		vuln(); 
}
